package com.gzc.pm.logic
{
	import cn.skyclass.net.BaseSubmitter;
	import cn.skyclass.net.OperationResult;
	
	import com.gzc.pm.dao.CplRouteDao;
	
	import mx.rpc.events.ResultEvent;
	
	public class CplRouteDeleter extends BaseSubmitter
	{
		public function CplRouteDeleter(routeId:int)
		{
			_routeId = routeId;
		}
		
		private var _routeId:int;
		
		override protected function doSubmit():void{
			var dao:CplRouteDao = new CplRouteDao();
			dao.deleteById(_routeId, onDeleted);
		}
		
		private function onDeleted(e:ResultEvent):void{
			var result:OperationResult = e.result as OperationResult;
			
			dispatchSubmittedEvent();
		}
		
	}
}